1. Field of the Invention
The present invention relates to a method for processing a database in a distributed processing system and, more particularly, to a method for processing a dynamic data base in a distributed processing system, based on a Common Object Request Broker Architecture (CORBA) platform.
2. Background of the Related Art
An Object Request Broker (ORB) is a virtual system for communicating between objects in a distributed object environment, and CORBA is a standard specification of the ORB. ORB is arranged by an Object Management Group (OMG) to standardize the object oriented technique.
Generally, a client that requests a service and an object implementation, providing the service, give and take a request or a service result (returned value) through the ORB, in the distributed object environment, and then the process is progressed. To begin with, the client passes a name and request content of the object, which is to be served, to the ORB. Then, the ORB finds the object implementation, based on the name, and transmits the requested contents. The object implementation returns a result of the service performance (return value) to the ORB, and the ORB transmits the result to the client. The client should be compatible with the interface of the ORB, to use a service of the optional object implementation. In addition, an Interface Definition Language (IDL) is used for defining the interface.
A platform is characterized as the hardware or software that forms the basis of a computer system. That is, an Operation System (OS) or an application is operated in a hardware or software environment.
FIG. 1 illustrates database processing in a background art distributed processing system, based on the CORBA platform. A process is shown in which a client 10 accesses a database 30, of a server 20, and obtains data through a distributed system, based on the CORBA platform. Although it is not shown in FIG. 1, the server 20 consists of a plurality of objects, and there is an object that processes the database in the plurality of objects. The object processing the database includes a plurality of methods.
As shown in FIG. 1, when the client 10 calls the method on the server 20, the corresponding method detects the data, wanted by the client 10, in the database 30. The server 20 then returns the data to the client 10 through an Internet Inter-ORB Protocol (IIOP) 40. According to the method, various methods are required because there are various requests by the client 10 for the data.
There are two parameters that are required when the client 10 calls the method. These are a Structure Query Language (SQL) string, for detecting data of the database 30, and a pointer of a data structure, for allocating the detected data. A transmission and a return of the parameters are made by a “call by reference” method. The SQL string is a query for the data that is wanted, and the data structure defines a structure and a formation of a storing space for storing the detected data.
The call by reference method is a method not for giving and taking a real value or data, but for giving and taking a pointer of a memory area, in which a real value or data is stored. And the above-mentioned pointer may be referred to as a reference pointer.
FIG. 2 is an exemplary view showing an IDL for the call by reference method. Generally, the client 10 finds a reference pointer of the database process object in the CORBA platform server 20. Then, the client 10 calls a method of the server 20 through the reference pointer. The called method detects the wanted data in the database 30 and then constructs the detected data into the data structure form, defined by the IDL, to transmit it to the client 10. In addition, the data structure is defined in the respective method.
If the method called by the client 10 does not exist or does not satisfy the client's request, the server 20 defines a new method. Thereafter, the server 20 should compile the IDL that is coded after adding the newly defined method to the previously defined methods.
FIG. 3 is a flow chart showing a database processing method using the background art CORBA platform. As shown therein, the client 10 finds the reference pointer of the database processing object in the server 20 (S1) and calls the method of the server 20 through the reference pointer (S2).
The called method detects the data required by the client 10, in database 30, through a search condition of the SQL string. Also, the called method allocates the storing spaces, according to the data structure form defined by the client 10 (S3 and S4), and copies the detected data to the allocated storing space (S5). In addition, a result value calculated by the above processes (S3, S4, and S5) is transmitted to the client 10, through the ORB 40 (S6).
An embodiment for processing the database using the background art distributed processing system, based on the CORBA platform, will be described in more detail with reference to FIGS. 2 and 3. The client 10 finds a reference pointer of the database processing object, located in the server 20, to detect the wanted data, by accessing the database 30. After that, the client 10 calls the corresponding method using the SQL string and the data structure pointer as method calling parameters. The SQL string is a parameter related to the query of the client. The called method detects the corresponding data using the SQL string as a database searching condition. The server 20 allocates the storing space according to the data structure form defined by the called method and copies the detected data to the allocated storing space.
The result value calculated through the above processes is stored in a certain memory area of the server 20 and returned to the memory area of the client 10, pointed to by the data structure pointer, through ORB 40. For example, assume that items of “name”, “customer number”, “birthday”, and “customer score” of customers having a customer score greater than 500 points are detected within the database by the client 10, among various information related to the customers stored and managed in database 30. Further assume that the detected data are “AAA”, “1011”, “May 27, 1977”, “501”, “BBB”, “1120”, “Nov. 20, 1972”, “620”, “CCC”, “1313”, “Oct. 28, 1974”, and “550”.
The method-A IDL call of client 10 is shown in Table 1, below.
TABLE 1Step AStruct structA{string strA; /“name” item/short intA1; /“customer” item/date datA2; /“birthday” item/short intA3; /“customer score” item/};Step Btypedef sequence<structA> returndataA;Step Cshort methodA(in string SQLstring, out returndataA retVal);
Step A defines the data structure that will be detected in database 30. Step B declares the data structure, defined in step A, as a sequence type. Step C is a sentence for calling a method having two parameters. As described above, if the data structure is declared as the sequence type, arrays having the same number of stored data are generated, so that memory is not wasted.
The client 10 creates the data structure reference pointer and the SQL string parameters and calls the corresponding method in the server 20 (Step C). The called method detects the corresponding data in the database 30 and allocates the storing space, in the form defined by the data structure. In addition, the method copies the detected data to the allocated storing space.
The result value, calculated through the above processes, is stored in a certain memory area of the server 20. After that, the result is returned to the memory area of the client 10, pointed to by the data structure pointer, through the ORB 40. In addition, the client 10 accesses the memory area in which the returned value is stored and outputs the corresponding data.
As described above, the server 20 should add a new method to the database processing objects, when no current method is able to accept the request of the client 10. In addition, when the new method is added, both the original methods and the new method should be compiled to redefine the IDL. As new methods are added, the corresponding objects get larger.
Also, in the process of designing the database program, the developer should consider all prospective client requests and should define a plurality of methods and data structures to support these client requests. Therefore, it takes a lot of time and expense to develop the program.
The above references are incorporated by reference herein where appropriate for appropriate teachings of additional or alternative details, features and/or technical background.